package apitest;
import cn.hutool.json.*;

import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

public class Test {
    public static void main(String[] args) {
        String result = Apitestocr.getResult();
        String need = ".*word.*";
        String keyword = "prism_wordsInfo";
        JSONObject jsonObject = JSONUtil.parseObj(result,false,true);
        JSONArray jsonArray = JSONUtil.parseArray(jsonObject.getStr(keyword));

        String[] strings = new String[1000];

        for(int i = 0;i<jsonArray.size();i++){
            if (jsonArray.get(i).toString().matches(need)){

                System.out.println(jsonArray.get(i));
            }

        }



//        System.out.println(jsonArray.getByPath(keyword));

//        System.out.println(jsonObject.toStringPretty());
//
//        Map<String, Object> hashMap = new HashMap<>();
//
//        hashMap = jsonObject.getRaw();
//
//        System.out.println(hashMap.entrySet().toString());


    }
}
